home *** CD-ROM | disk | FTP | other *** search
-
- PRINTER.DOC file
- ----------------
-
-
- I have often wanted to access some of the different typestyles
- and line weights available from my printer, but have always found
- it far too cumbersome to exit my application, load BASIC, enter
- some realy cryptic codes into a needlessly long program, run it,
- exit BASIC and return to my application, only to have to go
- through the whole exercise again in order to change back.
-
- There are so many powerful features built into most printers, but
- it is so difficult to access them, it is no surprise few people
- bother.
-
- Sure, there are a couple of public domain programs which allow
- selection of printer features from a menu, but none I have seen
- yet run concurrently with your application, can be accessed
- anywhere, anytime, and designed to suit your exact needs.
-
- Using Borland's Sidekick however, you can do just that. If you
- also have their Superkey program, or a similar one the process of
- sending a series of commands to the printer can be completely
- automated. This example shows how to do it, using an Epson FX-
- 80, but the procedure should be applicable with most printers.
-
- The action happens inside a Sidekick notepad window, so open one
- up, and give it a name like PRINTER.MAT I have set up a matrix
- with five columns. The first of these contains the label or
- function to be activated, such as "Compressed", "Pica", or
- "Elite", all of which are distinct pitches available on the
- Epson. Subsequent columns contain the codes to activate the
- following variations:
- - single strike (the printer's default)
- - double strike
- - single strike expanded (2x normal width)
- - double strike expanded.
-
- Each of these variations can be combined with the three pitches
- to give 12 different combinations, each with its own access
- code.
-
- I have also made room for special codes, such as Underlining
- mode, Italic mode, and 'script modes, which can be used with any
- of the others. Each of these has an activate and deactivate
- code, in the second and third columns only respectively. I also
- recommend that you put in the Master Reset Code, to get back to
- ordinary 10cpi Pica, should the printer (or user!) get lost
- among all those possibilities.
-
- Once the matrix has been set up, it is time to enter the codes
- themselves. Here is where the first problem arises: The Epson
- responds to codes which start with the "Esc" character (ASCII
- 27). But if you try to enter this character into Sidekick, it
- drops you back into your underlying application.
-
- Fortunately, there are at least two simple and elegant solutions.
-
- - áTurn on the Notepad's graphics mode (Ctrl-Q-T, or whatever
- you have set up for yourself). The Epson and most other
- printers also respond to the higher ASCII characters (128-
- 255), some of which duplicate the lower ones that give the
- Notepad such trouble. For the "Esc" character, the FX-80
- will accept ASCII 155 (27+128).
-
- With graphics mode enabled, this character can be entered by
- pressing the "Alt" key, and while holding it down, typing
- "155" on the numerical keypad, then releasing the "Alt" key.
- This needs to be done fairly quickly. (With Superkey also
- loaded, press "Alt" and "Left-Shift" together.)
-
- - áThe second alternative is to input ESC using a Control-Key
- sequence. The correct one is "caret-left sq.bracket", which
- I cannot put into this file, since it would make it
- difficult to print out on many printers. Look at # 27, in an
- ASCII chart.
-
- Then you can enter the relevant additional codes. I have used
- the Epson Master Select system, which assigns each combination
- to a unique number, prefaced with an "!". So, my command to
- turn on "Double-Strike-Expanded-Elite" is "Escape-Exclamation
- Mark-1" (three characters only). If a code is one that Notepad
- has trouble with, simply enter the +128 version, which means the
- same thing to the printer in every case that matters.
-
- An example is shown in PRINTER.MAT
-
- Have this file loaded into Sidekick residing in the background.
- To send a code to the printer:
-
- - activate Sidekick with "Ctrl-Alt",
- - move the cursor to the beginning of the code for
- the desired feature,
- - press the "Begin-Block" command (F7),
- - move to the right, to the space past the last character,
- - press the "End-Block" command (F8),
- - press the "Block-Print" command (Ctrl-K-P), and
- - exit Sidekick with "Ctrl-Alt".
-
- Block markers are inserted immediately before the character over
- the cursor, so be careful to enclose the whole string inside
- these markers. Block-Print sends this string to the printer;
- since it's prefaced with an "Esc", the printer interprets it as
- a feature select command.
-
- An alternative for positioning the Block markers is to move over
- just to the first character of the string, and use the Sidekick
- "Mark Single Word" command. This is useful where strings to go
- to the printer might be of varying lengths. In my example, they
- are not, so I have used the first method.
-
- Now for the fun part, the Superkey macros that make it so easy to
- send one of these codes to the printer. Sure it can be done
- manually by laboriously moving around the matrix, but with a few
- keystrokes, you can set up four macros to do it all.
-
- My macros are assigned to Alt-1 through Alt-4, to represent
- columns one though four of codes (actually columns two through
- five of the whole matrix.) Each macro goes through the
- procedure outlined above, with one change at the end. After the
- "Block-Print" is issued, I use the command to return to the
- beginning of each line, then press "F7" and "F8" while
- positioned under the first character. This effectively cancels
- the block markers.
-
- Using this setup, I don't need to waste time moving my cursor
- through the text, but need only scroll up or down in column 1,
- to find the desired line. Since there are no more than 12 lines
- in the whole file, it all happens very quickly.
-
- If you use the first method of marking blocks, where each string
- must is the same length, and the macro jumps over a fixed number
- of spaces, be sure that empty spaces are padded out with the null
- character, ASCII 1, which can be represented by ASCII 128, as far
- as an Epson is concerned.
-
- For printers with very complex and long command strings, like the
- HP Laserjet, a matrix format might not work, and you should also
- use the "Mark SIngle Word" method of choosing a Block to send.
-
- This technique works beautifully when you want to change print
- appearance on the fly, and can be set up in a few minutes to
- exactly match your specific needs.
-
- ----end
-